<?php

	include("../config.php");
	include(INCLUDEDIR."core.php");
	
	db::connect();
	
	$clases= db::getArray("SELECT id_clase FROM clases");
	foreach($clases as $id_clase) {
		$pin = getPinClase($id_clase);
		mysql_query("UPDATE clases SET pin_clase = '$pin' WHERE id_clase = '$id_clase'");	
	}

?>